
#ifndef CALLBACK_H_
#define CALLBACK_H_

#ifdef _cplusplus
extern "C" {
#endif

typedef enum RET_HANDLE {
	CONTINUE_HANDLE		=	0,
	SHUTDOWN_HANDLE	=	1,
	CLOSE_HANDLE				=	2
}RetHandle;

struct session;

typedef void onConnection(struct session* session, void* privateData);
typedef RetHandle onData(struct session* session, void* privateData);
typedef void onDisConnection(struct session* session, void* privateData);
typedef	void onWriteCompleteConnection(struct session* session);

typedef struct IServerCallBack {
	onConnection* onConnectionCallBack;
	onData* onDataCallBack;
	onDisConnection* onDisConnectionCallBack;
	onWriteCompleteConnection* onWriteCompleteConnectionCallBack;
} IServerCallBack;

#ifdef _cplusplus
}
#endif

#endif /* CALLBACK_H_ */
